import 'package:flutter/material.dart';

class LoginPage extends StatefulWidget {
  final Map arguments;
  LoginPage({Key key, this.arguments}) : super(key: key);

  @override
  _LoginPageState createState() => _LoginPageState();
}

class _LoginPageState extends State<LoginPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text('LoginPage')),
      body: Container(
        child: Column(
          children: <Widget>[
            SizedBox(height: 100.0),
            Row(
              children: <Widget>[
                SizedBox(width: 15.0),
                Expanded(
                  child: GestureDetector(
                    onTap: () {
                      Navigator.pushNamed(context, '/registerPage');
                    },
                    child: Container(
                      color: Colors.red,
                      child: Text('注册', style: TextStyle(color: Colors.white, fontSize: 16.0)),
                      height: 40.0,
                      alignment: Alignment.center,
                    ),
                  ),
                  flex: 2,
                ),
                SizedBox(width: 15.0),
                Expanded(
                  child: GestureDetector(
                    child: Container(
                      color: Colors.red,
                      child: Text('登录', style: TextStyle(color: Colors.white, fontSize: 16.0)),
                      height: 40.0,
                      alignment: Alignment.center,
                    ),
                    onTap: () {
                      Navigator.of(context).pop();
                    },
                  ),
                  flex: 2,
                ),
                SizedBox(width: 15.0),
              ],
            )
          ],
        ),
      ),
    );
  }
}
